import axios from "@/api/index.js"
//祖分类
function indexaction(data) {

	return axios({
		url: "/category/indexaction",
		method:'get',
		data
	})
}
//子分类
function currentaction(data) {

	return axios({
		url: "/category/currentaction",
		method:'get',
		data
	})
}
//获取导航数据
function categoryNav(data) {

	return axios({
		url: "/category/categoryNav",
		method:'get',
		data
	})
}
//导航下的商品列表
function goodsList(data) {

	return axios({
		url: "/goods/goodsList",
		method:'get',
		data
	})
}
//子分类下的商品详情页
function detailaction(data) {

	return axios({
		url: "/goods/detailaction",
		method:'get',
		data
	})
}
// 添加收藏
function addcollect(data) {

	return axios({
		url: "/collect/addcollect",
		method:'post',
		data
	})
}
//获取收藏列表
function listAction(data) {

	return axios({
		url: "/collect/listAction",
		method:'get',
		data
	})
}
// 添加购物车
function addCart(data) {

	return axios({
		url: "/cart/addCart",
		method:'post',
		data
	})
}
// 购物车列表
function cartList(data) {

	return axios({
		url: "/cart/cartList",
		method:'get',
		data
	})
}
export{
	indexaction,	
	currentaction,
	categoryNav,
	goodsList,
	detailaction,
	addcollect,
	listAction,
	addCart
}